package head.first.model.observer;

/**
 * create by yiyongyao
 * Date:2018/3/6 下午4:38
 * Description:
 */
public class WeatherStation {

    public static void main(String[] args) {
        WetherData wetherData = new WetherData();
        CurrentConditionsDispaly currentConditionsDispaly = new CurrentConditionsDispaly(wetherData);
        wetherData.registerObserver(currentConditionsDispaly);
        wetherData.setMeasurements(80,65,40);
        wetherData.measurementsChanged();

        WetherData wetherData2 = new WetherData();
        wetherData2.registerObserver(currentConditionsDispaly);
        wetherData.measurementsChanged();

    }
}
